package com.jf.mocker.mock;

import com.jf.mocker.MyTestClass2;
import com.jf.mocker.anotations.IClassMocker;
import com.jf.mocker.anotations.IMethodMocker;
import com.jf.mocker.anotations.MethodMockType;

@IClassMocker("com.jf.mocker.MyTestClass2")
public class MyMocker2 {

    private MyTestClass2 myTestClass;

    public MyMocker2(MyTestClass2 myTestClass) {
        this.myTestClass = myTestClass;
    }

    @IMethodMocker(name = "getMessage")
    public String replaceGetMessage(){
        System.out.println("replaceGetMessage from MyMocker!");
        return "i had replace getMessage() !!!!";
    }

    @IMethodMocker(name = "setMessage", mockType = MethodMockType.After)
    public void afterSetMessage(){
        System.out.println("replaceSetMessage from MyMocker!");
    }

}
